/* Position.java
 * 
 * Alfred Olschnoegger
 * 22.05.2008
 */

package domain.location;

/**
 * This Class keeps GPS-10x10 Field Positions 
 *
 * @date 22.05.2008
 * @author Alfred Olschnoegger
 */

public class Position {
	
	private int mX = 0;
	private int mY = 0;
	
	private double mGpsX = 0.0;
	private double mGpsY = 0.0;
	
	public Position(int x, int y) {
		mY = y;
		mX = x;
	}

	public Position(int x, int y, double gpsX, double gpsY) {
		mY = y;
		mX = x;
		mGpsX = gpsX;
		mGpsY = gpsY;
	}


	public int getY() {
		return mY;
	}

	public double getGpsY() {
		return mGpsY;
	}

	protected void setY(int y) {
		mY = y;
	}

	protected void setGpsY(double y) {
		mGpsY = y;
	}

	public int getX() {
		return mX;
	}

	public double getGpsX() {
		return mGpsX;
	}
	
	protected void setX(int x) {
		 mX = x;
	}
	
	protected void setGpsX(double x) {
		 mGpsX = x;
	}
	
	public Position clone() {
		return new Position(mX, mY, mGpsX, mGpsY);
	}
	


	public boolean equals(Object obj) {
		if(obj.getClass().equals(this.getClass())) {
			Position pos = (Position) obj;
			if(pos.mX == this.mX && pos.mY == this.mY) {
				return true;
			}

		}
		return false;
	}
	/*
	@Override
	public int hashCode() {
		return mX+mY;
	}
	
	@Override
	public int compareTo(Position pos) {
		if((this.mX == pos.mX) &&  (this.mY == pos.mY))
			return 0;
		
		if((this.mX + this.mX) < (pos.mY + pos.mY)) {
			return -1;
		} else {
			return 1;
		}
	}
	*/
}
	





// end of Position.java
